package demo.components.kafka;

import java.nio.charset.Charset;

/**
 * Constants shared by all projects
 */
public class CommonConst {

    /** <code>秒</code> */
    public static final long SECOND = 1000;

    /** <code>分钟</code> */
    public static final long MINUTE = 60 * SECOND;

    /** <code>小时</code> */
    public static final long HOUR = 60 * MINUTE;

    /** <code>天</code> */
    public static final long DAY = 24 * HOUR;

    /** <code>月</code> */
    public static final long MONTH = 30 * DAY;

    /** <code>系统换行符</code> */
    public static final String LINE_SEPARATOR = System.getProperty("line.separator");

    /** <code>系统路径分割符</code> */
    public static final String PATH_SEPARATOR = System.getProperty("path.separator");

    /** <code>消息换行符</code> */
    public static final String MESSAGE_LINE_SEPARATOR = "\n";

    /** <code>泡泡换行符</code> */
    public static final String POPO_LINE_SEPARATOR = "\r\n";

    /** <code>邮件换行符</code> */
    public static final String EMAIL_LINE_SEPARATOR = "<br>";

    /** <code>NULL</code> */
    public static final String NULL = "NULL";

    /** <code>字符编码</code> */
    public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");

    public static final Charset GBK_CHARSET = Charset.forName("gbk");

    /** <code>不存在</code> */
    public static final String NOT_EXIST = "Not Exist";

    public static final String COMMA = ",";

    public static final String WILDCARD = "*";

    public static final String HYPHEN = "-";

    public static final String UNDERLINE = "_";

    public static final String REDIS_SEPARATOR = UNDERLINE;

    public static final String BAR = "|";

    public static final String BAR_STR = "\\|";

    public static final String PERCENT = "%";

    public static final String COLON = ":";

    public static final String SLASH = "/";

    public static final String EQUAL = "=";

    public static final int FLOAT_PRESICION_BACKEND = 6;

    public static final int FLOAT_PRESICION_FRONTEND = 2;

    /** <code>NULL STR</code> */
    public static final String NULL_STR = "";

    /** <code>FORMAT STR</code> */
    public static final String STRING_FORMAT = "%s";

    public static final String PRODUCTID_AND_NAMESPACE_FORMAT = STRING_FORMAT + HYPHEN + STRING_FORMAT;

    public static final String DOT = ".";

    public static final String DOT_STR = "\\.";

    public static final int KB = 1024;

    private CommonConst() {
    }
}
